﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TravelLink.WebModel {
    public class AuthPage : Pagebase {
        protected bool _isValidAuth = true;

        protected override void OnInit(EventArgs e) {
            base.OnInit(e);
            if (_isValidAuth) {
                if (CurrentUser == null) {
                    Response.Redirect(Consts.User_Register + "?ref=" + Server.UrlEncode(this.Request.RawUrl));
                    return;
                }
                else if (!CurrentUser.DBUser.Status.HasValue || CurrentUser.DBUser.Status < 1) {
                    Response.Redirect(Consts.Member_RegisterSuccess);
                    return;
                }
            }
        }
    }
}
